﻿@model IEnumerable<Innova.Entites.SERVICIO>

<script src="~/Scripts/jquery-1.10.2.js"></script>
<script src="~/Scripts/jquery-ui.js"></script>

@{
    ViewBag.Title = "Servicios Disponibles";
    var CategoriaId = Html.Value("CategoriaId");
    var PatrocinadorId = Html.Value("PatrocinadorId");
}



@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary()

    <ul data-role="listview" data-inset="true">
        <li data-role="list-divider">Disponibilidad</li>
        @Html.Hidden("Id", PatrocinadorId)
        <li data-role="fieldcontain">
            Fecha de Ingreso: 
            @Html.TextBox("fecIngreso", null, new { type = "date" })
        </li>
        <li data-role="fieldcontain">
            Fecha de Salida:
            @Html.TextBox("fecSalida", null, new { type = "date" })
        </li>
        <li data-role="fieldcontain">
            Cant. Persona:
            @Html.TextBox("cantPersonas", null, new { type = "number" })
        </li>

        <li data-role="fieldcontain">
            <input type="submit" name="Buscar" data-icon="search" value="Buscar" />
        </li>
    </ul>
}


<ul data-role="listview" data-inset="true" style="min-width: 250px;">



    @foreach (var item in Model)
    {        
        <li>
            <a href="@Url.Action("Create", "Reserva", new { idServicio = item.Id })">
                <img src="@Url.Action("GetFotoServicio", "Servicio", new { id = item.Id })" \>
                <h3>@Html.DisplayFor(modelItem => item.Titulo)</h3>
                <h3>@Html.DisplayFor(modelItem => item.Descripcion)</h3>
                <h3>@Html.DisplayFor(modelItem => item.TopeNiños)</h3>
                <h3>@Html.DisplayFor(modelItem => item.TopeAdultos)</h3>
                <h3>@Html.DisplayFor(modelItem => item.Tarifa)</h3>

                <input type="button" title="Reservar" value="Reservar" />
            </a>
        </li>
    }
</ul>

<p>
    <a href="@Url.Action("PatroByCatId", "Patrocinador", new { id = CategoriaId })">
        <img src="@Url.Content("~/Content/images/arrow-back.png")" title="Atras" /></a>
</p>


@{
    var message = TempData["AlertMessage"] ?? string.Empty;
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")

    <script type="text/javascript">
        var message = '@message';
        if (message)
            alert(message).alert;

    </script>
}
